"""
类型注解-Union类型
Union[类型, ......, 类型] 可以定义联合类型注解
"""

from typing import Union

print("=====================================================")
my_list: list[Union[int, str]] = [1, 2, "hello", "world"]
my_dict: dict[str, Union[int, str]] = {"name": "周杰伦", "age": 18}


def func(data: Union[int, str]) -> Union[int, str]:
    pass
